#!/usr/bin/env /usr/local/python3
# -*- coding: utf-8 -*-

"""
http  post 请求
"""

__author__ = "hubert"

import requests
import json

if __name__ == '__main__':
    url = "http://111.7.186.130:18189/EPG/interEpg/user/default/authorize"   # 河南移动
    url2 = "http://111.40.202.39:33200/EPG/interEpg/user/default/authorize"  # 黑龙江移动
    url3 = "http://127.0.0.1/EPG/interEpg/user/default/authorize"  # nginx代理
    url4 = "http://111.7.186.130:18189/EPG/interEpg/user/default/authorize?platform=105&epg_server=http%3A%2F%2F111.7.144.24%3A33200&userToken=11CD9818756433317C691ED5307C3931&businessID=1529080619901&offerId=ef0cc08191414e5e92efff7c5883dba0"
    data = {"cid": "p_dawn00000000000000000002000495","tid": "-1", "supercid": "", "playType":"1", "contentType": "0", "idflag": "1", "businessType":"1"}
    headers = {'Authorization': '126E6AAF306533327C731932307C3331', 'Content-Type': 'application/json; charset=utf-8',
                'User-Agent':'Mozilla/5.0 (Linux; Android 4.4.2; M301H_ZNSZ0_HN47 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/30.0.0.0 Safari/537.36'}
    # res = requests.post(url, data=json.dumps(data), headers=headers)
    res = requests.post(url=url, files=data, headers=headers)
    print(res.status_code)
    print(res.text)


